package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 千锋健哥
 */
//指定被调用微服务的服务名
@FeignClient(name = "QF-SEARCH", fallback = SearchFallBack.class)
@RequestMapping("/search")
public interface SearchFeign {

    @RequestMapping("/hello")
    public String hello();


    @RequestMapping("/findById")
    public User findUserById(@RequestParam("id") Integer id);

    @RequestMapping("/insertUser")
    public String insertUser(@RequestBody User user);
}
